Smart pupils